package com.ltedu.system.service.impl;

import com.ltedu.system.domain.SysMenuRole;
import com.ltedu.system.mapper.SysMenuRoleMapper;
import com.ltedu.system.service.SysMenuRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 菜单角色关联表 服务实现类
 * </p>
 *
 * @author Jerry
 * @since 2020-11-27
 */
@Service
public class SysMenuRoleServiceImpl extends ServiceImpl<SysMenuRoleMapper, SysMenuRole> implements SysMenuRoleService {

    /**
     * 根据用户id删除
     *
     * @param roleId 角色id
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void removeByRoleId(Long roleId) {
        this.baseMapper.removeByRoleId(roleId);
    }
}
